package com.xmy.cultivate.service;

import com.aliyun.facebody20191230.models.AddFaceResponse;
import com.aliyun.facebody20191230.models.SearchFaceResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xmy.cultivate.entity.FaceDb;
import com.xmy.cultivate.entity.Student;
import com.xmy.cultivate.entity.StudentFaceData;
import com.xmy.cultivate.entity.request.DetectFaceDataRequest;
import com.xmy.cultivate.entity.request.FaceDetectLivingRequest;

public interface IAliyunFaceService {

    /**
     * 添加人脸样本
     * @return
     */
    public abstract boolean addFaceSample(Long schoolId,String DbName,String entityId,String lables) throws Exception;

    /**
     * 更新人脸样本
     * @return
     */
    public abstract boolean updateFaceSample(Long schoolId,String DbName,String entityId,String lables) throws Exception;

    /**
     * 人脸样本数据
     * @param schoolId
     * @param DbName
     * @return
     * @throws Exception
     */
    public abstract boolean delListFaceSample(Long schoolId,String DbName) throws Exception;

    public boolean delFaceSampleForEntityId(Long schoolId,String DbName,String entityId) throws Exception;

    public boolean getFaceSampleForEntityId(Long schoolId,String DbName,String EntityId) throws Exception;

    public abstract boolean existFaceSample(Long schoolId,String DbName,String entityId)throws Exception;

    /**
     * 添加人脸数据
     * @return
     */
    AddFaceResponse addFaceData(Long schoolId, String DbName, String imageUrl, String entityId, String extraData, Integer faceType) throws Exception;

    /**
     * 删除人脸数据
     * @return
     */
    public abstract boolean delFaceData(Long schoolId,String DbName,String faceId) throws Exception;

    public abstract SearchFaceResponse searchFace(String DbName,Long schoolId,String imageUrl) throws Exception;

    public abstract String searchFaceReturnEntityId(String DbName,Long schoolId,String imageUrl) throws Exception;

    /**
     * 创建人脸数据库
     * @param schoolId
     * @param DbName
     * @return
     * @throws Exception
     */
    public abstract boolean addFaceDb(Long schoolId,String DbName) throws Exception;

    boolean getFaceEntitiesList(Long schoolId, String DbName) throws Exception;

    FaceDetectLivingRequest detectLivingFace(Long schoolId, String imageUrl) throws Exception;

    /**
     * 人脸检测定位
     * @param schoolId
     * @param imageUrl
     */
    DetectFaceDataRequest detectFace(Long schoolId, String imageUrl) throws Exception;
}
